import request from "@/utils/request";
// 获取用户列表
export function getPermissionList(limit, page) {
    return request({
        url: `/api/v1/permission/getPermissionList/${limit}/${page}`,
        method: "get",
    });
}
// 添加角色
export function addPermission(data) {
    return request({
        url: `/api/v1/permission/addPermission`,
        method: "post",
        data
    });
}
// 查询角色拥有的权限
export function getPermissionsByPermissionId(permission_id) {
    return request({
        url: `/api/v1/permission/getPermissions/${permission_id}`,
        method: "get",
    });
}
// 编辑角色
export function EditPermission(data) {
    return request({
        url: `/api/v1/permission/alter`,
        method: "put",
        data
    });
}
// 删除角色
export function DeletePermission(id) {
    return request({
        url: `/api/v1/permission/deleteById/${id}`,
        method: "delete",
    });
}
// 模糊搜索用户
export function SearchPermissions(fuzzyName, limit, page) {
    return request({
        url: `/api/v1/permission/query/fuzzy/${fuzzyName}/${limit}/${page}`,
        method: "get",
    });
}
export function BatchDeletePermission(data) {
    return request({
        url: `/api/v1/root/permission/batch/deletePermission`,
        method: "delete",
        data
    });
}
// 获取所有权限
export function getAllPermissionList() {
    return request({
        url: `/api/v1/permission/getPermissionListWithoutPage`,
        method: "get",
    });
}